var Mock = require("./utils/WxMock.js"); 

Mock.mock('https://www.srdb.com/news',{
        "code":200,
        "data|10":[
            {
                "title":function() {
                  return Mock.Random.csentence(20, 50)
                },
                "poster":function() {
                  return Mock.Random.image()
                },
                "total_readers":function() {
                  return Mock.Random.integer(100,1000)
                },
                "total_likes":function() {
                  return Mock.Random.integer(100,1000)
                },
                "id":function() {
                  return Mock.Random.guid()
                }
            }
        ]
})

Mock.mock('https://www.srdb.com/forum',{
        "code":200,
        "data|10":[
            {
                "question":function() {
                  return Mock.Random.csentence(20, 50)
                },
                "best_answer":function() {
                  return Mock.Random.csentence(20, 50)
                },
                "total_readers":function() {
                  return Mock.Random.integer(100,1000)
                },
                "price":function() {
                  return Mock.Random.integer(0, 100)
                },
                "id":function() {
                  return Mock.Random.guid()
                }
            }
        ]
})

Mock.mock('https://www.srdb.com/document',{
        "code":200,
        "data|10":[
            {
                "title":function() {
                  return Mock.Random.csentence(20, 50)
                },
                "poster":function() {
                  return Mock.Random.image()
                },
                "create_time":function() {
                  return Mock.Random.date()
                },
                "id":function() {
                  return Mock.Random.guid()
                }
            }
        ]
})

Mock.mock('https://www.srdb.com/drug',{
        "code":200,
        "data|10":[
            {
                "name":function() {
                  return Mock.Random.csentence(3, 10)
                },
                "poster":function() {
                  return Mock.Random.image()
                },
                "description":function() {
                  return Mock.Random.csentence(10, 100)
                },
                "id":function() {
                  return Mock.Random.guid()
                }
            }
        ]
})

Mock.mock('https://www.srdb.com/hospital',{
        "code":200,
        "data|10":[
            {
                "name":function() {
                  return Mock.Random.csentence(3, 10)
                },
                "poster":function() {
                  return Mock.Random.image()
                },
                "description":function() {
                  return Mock.Random.csentence(10, 100)
                },
                "id":function() {
                  return Mock.Random.guid()
                }
            }
        ]
})

Mock.mock('https://www.srdb.com/doctor',{
        "code":200,
        "data|10":[
            {
                "name":function() {
                  return Mock.Random.csentence(3, 10)
                },
                "avatar":function() {
                  return Mock.Random.image()
                },
                "resume":function() {
                  return Mock.Random.csentence(10, 100)
                },
                "id":function() {
                  return Mock.Random.guid()
                }
            }
        ]
})

Mock.mock('https://www.srdb.com/login',{
        "code":200,
        "data":
            {
                "name":function() {
                  return Mock.Random.cname(20, 50)
                },
                "avatar": function() {
                  return Mock.Random.image()
                },
                "id":function() {
                  return Mock.Random.guid()
                }
            }
        
})

App({
    onLaunch (options) {
      // Do something initial when launch.
    },

    onShow (options) {
      // Do something when show.
    },

    onHide () {
      // Do something when hide.
    },
    
    onError (msg) {
      console.log(msg)
    },
})